home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 4
/
FM Towns Free Software Collection 4 - Disc 1.iso
/
data
/
fmgraph
/
g_bdrmod.c
< prev
next >
Wrap
Text File
|
1991-10-18
|
634b
|
35 lines
#include <stdio.h>
#include <dos.h>
struct BORDERMODE {
unsigned type;
unsigned char mode,reserve;
};
extern unsigned char gds_fshift;
extern unsigned gds_wrkoff;
extern unsigned gds_wrkseg;
int g_bordermode(unsigned char mode)
{
union REGS reg;
struct SREGS seg;
struct {
unsigned len;
struct BORDERMODE bdr;
} gdata;
segread(&seg);
reg.h.ah=gds_fshift+0x0f;
reg.x.di=(unsigned)&gdata;
seg.ds=seg.ss;
gdata.len=6;
gdata.bdr.type=0x53a2;
gdata.bdr.mode=mode;
gdata.bdr.reserve=0;
reg.x.bx=gds_wrkoff;
seg.es=gds_wrkseg;
int86x(0x92,®,®,&seg);
return (int)reg.h.ah;
}